import { defineComponent } from 'vue';
import GLayout from '/@/shared/components/g-layout/index.vue';
import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
export default defineComponent({
  components: { GLayout },
  data() {
    return {
      value: '',
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {},
    handleCopy() {
      if (!this.value) {
        abp.notify.warn('请输入要拷贝的内容！');
        return;
      }
      const { clipboardRef, copiedRef } = useCopyToClipboard();
      clipboardRef.value = this.value;
      if (copiedRef) {
        abp.notify.success('copy success！');
      }
    },
  },
});
